/***********************************************************************
    filename:   DaterMainCalendarAgendaWindow.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for MainCalendarAgendaWindow objects in UI
*************************************************************************/
#ifndef	_DaterMainCalendarAgendaWindow_h_
#define _DaterMainCalendarAgendaWindow_h_

#include "DaterMainWindow.h"
#include "DaterMainCalendarWindow.h"
#include <vector>
#include <string>
#include <stack>

class MainCalendarAgendaWindow : public MainWindow, public MainCalendarWindow
{
	/* !
	\brief
		The Events in Agenda version.
	*/
public:
		/* !
		\brief
			Construct the sample of class MainCalendarAgendaWindow.

		\param id_name
			- a string to represent the prefix of the window.
			
		\param parent
			- point to parent window.
		*/
	MainCalendarAgendaWindow(const CEGUI::String& id_name, CEGUI::Window* parent = 0);
	
		/* !
			Destructor of class MainCalendarAgendaWindow.
		*/
	~MainCalendarAgendaWindow();

		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to show window.
		*/
	virtual void showWindow();
	
		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to hide window.
		*/
	virtual void hideWindow();

		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to set to next.
		*/
	virtual bool setToNext(const CEGUI::EventArgs &args);
	
		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to set to previous.
		*/
	virtual bool setToPrevious(const CEGUI::EventArgs &args);
	
		/* !
		\brief
			a virtual function generated from class MainCalendarWindow to get head text.
		*/
	virtual std::string getHeadText();

private:
		//! Member to subscribe handler to each 'slot' in the layout.
    void subscribeEvents();

	bool chosen(const CEGUI::EventArgs &args);

	bool chosen_follow(std::string address);

	bool MouseWheel(const CEGUI::EventArgs& args);

	bool MouseButtonDown(const CEGUI::EventArgs& args);

	bool MouseButtonUp(const CEGUI::EventArgs& args);

	bool MouseEnters(const CEGUI::EventArgs&  args);

	int n;

	std::string address;

	std::vector<std::string> vec_address;

	std::vector<CEGUI::Window*> _scrollPanesSections;

	int _year;

	int _month;

	int _day;

	std::string _base_name;

	bool on_addEvent;

	std::stack<CEGUI::Window*> _choosenWindows;
};

#endif